package ca.ualberta.cs.BibTex;

import java.io.Reader;
import java.io.StringReader;
import java.util.HashMap;

public class BibTexManager {

	static HashMap<String,String> parse(String bibtex){
		HashMap<String,String> bib = new HashMap<String, String>();
		if(bibtex.trim().startsWith("@")){
			bibtex = bibtex.trim().substring(1);
			
		}
		return bib;
	}
	
	public static void main(String[] args) {
		/*String citation = " @INPROCEEDINGS{4444246,"+
			"author={Micheal Buro, and Andres, F. and Veltman, K.}," + //
			"journal={Digital Information Management, 2007. ICDIM '07. 2nd International Conference on}, " +
			"title={Advances in collaborative annotation in semantic management environment}," +
			"year={2007}," +
			"month={oct.}," +
			"volume={1}," +
			"number={}," +
			"pages={339 -344}," +
			"keywords={annotation archive;annotation database;collaborative annotation;information archives;" +
			"information searching;semantic logical model;semantic management environment;semantic physical data model;" +
			"topic maps data model;database management systems;groupware;information retrieval systems;query processing;}," +
			"doi={10.1109/ICDIM.2007.4444246},"+
			"ISSN={},}";
		
		BibTex b1 = new BibTex(citation);
		//System.out.println(b1.toString());
		BibTex bb = new BibTex(b1.toString());
		
		citation = "@article{1292594, " +
			"author = {Agosti, Maristella and Ferro, Nicola}, "+
			"title = {A formal model of annotations of digital content}, "+
			"journal = {ACM Trans. Inf. Syst.}, "+
			"volume = {26}, "+
			"number = {1}, "+
			"year = {2007}, "+
			"issn = {1046-8188}, "+
			"pages = {3}, "+
			"doi = {http://doi.acm.org/10.1145/1292591.1292594}, "+			
			"publisher = {ACM}, "+
			"address = {New York, NY, USA}, " +
			"} " ;
		
		BibTex b2 = new BibTex(citation);
		BibTex bb2 = new BibTex(b2.toString());
		
		citation = "@inproceedings{1386359, "+
			"author = \"Wang, Mei and Zhou, Xiangdong and Chua, Tat-Seng\", "+
			"title = \"Automatic image annotation via local multi-label classification\", "+
			"booktitle = \"CIVR '08: Proceedings of the 2008 international conference on Content-based image and video retrieval\", "+
			"year = \"2008\", "+
			"isbn = \"978-1-60558-070-8\", "+			
			"pages = \"17--26\", "+
			"location = \"Niagara Falls, Canada\", "+
			"doi = \"http://doi.acm.org/10.1145/1386352.1386359\", "+
			"publisher = \"ACM\", "+
			"address = \"New York, NY, USA\", "+
			"} ";
		
		BibTex b3 = new BibTex(citation);*/
		
		String citation2 = " @INPROCEEDINGS{4444246,"+
		"author={Micheal Buro, F. Andres, K. Veltman, and S. Bayat}," + //
		"journal={Digital Information Management, 2007. ICDIM '07. 2nd International Conference on}, " +
		"title={Advances in collaborative annotation in semantic management environment}," +
		"year={2007}," +
		"month={oct.}," +
		"volume={1}," +
		"number={}," +
		"pages={339 -344}," +
		"keywords={annotation archive;annotation database;collaborative annotation;information archives;" +
		"information searching;semantic logical model;semantic management environment;semantic physical data model;" +
		"topic maps data model;database management systems;groupware;information retrieval systems;query processing;}," +
		"doi={10.1109/ICDIM.2007.4444246},"+
		"ISSN={},}";
	
		BibTex b4 = new BibTex(citation2);
		//System.out.println(b1.toString());
		BibTex bb4 = new BibTex(b4.toString());
			
		System.out.println(b4.toString());
	}

}
